A wireless fidelity (WiFi) technology, which is typically referred to as a wireless local area network (WLAN), finds wide use in a variety of industries due to its advantages such as rapid to deploy, convenient to use, and high transmission rate. Access points of WiFi networks are found available in so many places, such as hotels, cafes, schools, and hospitals, that WiFi is made easy almost everywhere you are.
Herein, a service refers to a function provided by a device, for example, a printing service provided by a printer device, a scanning service provided by a scanner, and a service of cash deposit and withdrawal provided by an ATM. In real-world circumstances, a user may request these devices from different operators or individuals who operate these devices, or a user at home may want to directly connect to and use these devices. In both cases, these services need to be discovered first. Service information is a description about a service, and the service information may include information such as a name, a category, a characteristic, a price, and a site of the service. When a device needs to announce its service, the device may send out service information, so that another device that receives the service information is able to know the service this device is capable of providing.
On a WLAN, a service may be directly provided by an access point (AP) or a station (STA), which means that this AP or STA is a special device, for example, the AP or STA is a printer or a copier; alternatively, a service may also be indirectly provided by the AP or the STA, to be specific, the AP or the STA records service information of a service providing device, such as a printer or a copier, connected to the AP or the STA.
In the prior art, to discover or request a service on a WLAN, a requesting device sends a broadcast query frame to devices on the entire WLAN, to inquire which device can provide the requested service, for example, to inquire which device is a printer. Afterwards, a device that receives the query frame and is capable of providing the requested service replies to the requesting device in a unicast manner, whereas a device incapable of providing the requested service does not respond. After receiving the reply from the device capable of providing the requested service, the requesting device needs to inquire about some detailed service information. For example, the requesting device may inquire a printer whether the printer is a 3D printer, where the printer is located, and price of the printing, and the like. The requesting device may send a query frame for further service information by means of broadcasting, to query the service information of the service providing device.
When the service information is queried in the broadcast manner, each receiving device on the WLAN needs to receive and interpret the broadcast frame. In which case, each device needs to completely parse the broadcast frame, and then discard the broadcast frame if finding out that the broadcast frame does not belong to the device. This leads to a waste of resources and increases power consumption for the entire network.